package tech.eyao.hs60x.spring.quartz;

import javax.annotation.Resource;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.scheduling.annotation.EnableScheduling;
import org.springframework.scheduling.annotation.Scheduled;
import org.springframework.stereotype.Component;

import tech.eyao.hs60x.common.ConstantsKey;
import tech.eyao.hs60x.redis.template.ShakeCoRedisTemplate;

@Component
@EnableScheduling
public class ShakeQuartz {
	
	private static final Logger logger = LoggerFactory.getLogger(ShakeQuartz.class);
	@Resource
	private ShakeCoRedisTemplate template;
	
	@Scheduled(cron = "0 0 0 * * ?")
    public void run() throws Exception {
		logger.info("[ShakeQuartz run delete shake key]");
		template.delete(ConstantsKey.getShakeKey());
    }
}
